<div ng-controller="appserverController">
	
	<div class="row">
		<div class="col-md-5 col-md-offset-7">
			<div style="text-align:right;">
				<input type="text" class="form-control" ng-model="newServer.ip" placeholder="地址:0.0.0.0" style="display: inline;max-width: 195px;width:37%">
				<input type="number" class="form-control" ng-model="newServer.port" placeholder="端口:80" style="display: inline;max-width:100px;width:29%">
				<button type="submit" class="btn btn-primary" ng-click="addServer();" style="max-width:150px;width:31%;margin-top:-3px;">添加服务器</button>
			</div>
		</div>
	</div>

	<div class="row" style="margin-top:10px;margin-bottom:10px;">
		<div class="col-md-12">
			<div ng-if="servers == null">
				<div class="alert alert-info" role="alert" style="text-align: center;">加载中...</div>
			</div>
			<div ng-if="servers != null && servers.length == 0">
				<div class="alert alert-warning" role="alert" style="text-align: center;">没有服务器信息</div>
			</div>
			<div class="list-group">
			  <a ng-repeat="(index, server) in servers" ng-click="showMonitors(server);" class="list-group-item">
			  	<div style="max-width:200px;width:40%;float:left;">{{server.ip}}</div>
			  	<div style="display:inline;">{{server.port}}</div>
			    <span style="float:right;cursor:pointer;" class="glyphicon glyphicon-trash" ng-click="delServer($event, server);"></span>
			  </a>
			</div>
		</div>
	</div>
		
</div>
